package a.f.d.a;

import a.c.ab;
import a.c.bb;
import a.c.e;
import a.c.m;
import a.c.q;
import a.c.v;
import a.d.f;
import a.d.s;
import a.d.w;
import a.f.cd;
import a.f.o;
import a.f.zb;
import a.f.zc;

import java.awt.geom.Rectangle2D.Double;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

class k
{
  private static final double a = Math.sqrt(2.0D);
  private ab b = new ab();
  private bc c;
  private rb d;
  private double f = 10.0D;
  private double g = 0.0D;
  private static final double h = 15.0D;
  private static final double i = 10.0D;
  
  public k(bc parambc, rb paramrb)
  {
    this.c = parambc;
    this.d = paramrb;
  }
  
  void a(Map paramMap)
  {
    Object localObject = paramMap.get("SameLayerEdgeSupport.minimumEdgeDistance");
    if (!d.R)
    {
      if ((localObject instanceof Number)) {
        a(((Number)localObject).doubleValue());
      }
      localObject = paramMap.get("SameLayerEdgeSupport.defaultThickness");
    }
    if ((localObject instanceof Number)) {
      this.g = ((Number)localObject).doubleValue();
    }
  }
  
  public void a(o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    m localm = paramo.w();
    do
    {
      if (!localm.e()) {
        break;
      }
      a.c.d locald = localm.a();
      int j = this.c.a(locald.e()).h();
      int k = this.c.a(locald.f()).h();
      if (!bool2)
      {
        if (j == k) {
          a(paramo, locald);
        }
        localm.f();
      }
    } while (!bool1);
  }
  
  public void a(o paramo, a.c.d paramd)
  {
    if (!d.R)
    {
      if (paramo.j(paramd)) {
        paramo.f(paramd);
      }
      this.d.b(paramd);
    }
    this.b.add(paramd);
  }
  
  public void c(o paramo, a.c.d paramd)
  {
    if ((d.R) || (!paramo.j(paramd))) {
      paramo.g(paramd);
    }
  }
  
  public void b(o paramo)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    do
    {
      for (v localv = this.b.f(); !bool1; localv = localv.a())
      {
        if (localv == null) {
          break;
        }
        this.b.h(localv);
        c(paramo, (a.c.d)localv.c());
      }
    } while (bool2);
  }
  
  public void a(o paramo, bc parambc, f paramf, e parame, zc paramzc, ec paramec, double paramDouble, boolean paramBoolean) {}
  
  void a(o paramo, f paramf, vb paramvb, bc parambc, double paramDouble, Map paramMap)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    sb localsb = sb.c(paramo);
    Iterator localIterator = paramvb.a().iterator();
    label427:
    label429:
    label575:
    label846:
    do
    {
      do
      {
        zb localzb;
        int j;
        ArrayList localArrayList;
        double d5;
        w localw1;
        do
        {
          a.c.d locald;
          do
          {
            if (!localIterator.hasNext()) {
              break;
            }
            locald = (a.c.d)localIterator.next();
            y localy = parambc.a(locald);
            localzb = paramo.e(locald);
            j = localzb.a();
            if (!bool2) {
              if (localy.a() == 4)
              {
                double d1 = 0.0D;
                double d3 = 0.0D;
                if ((bool2) || (paramMap.containsKey(locald)))
                {
                  localObject1 = (e)paramMap.get(locald);
                  localObject2 = (d.rb_)parambc.a((e)localObject1);
                  localObject3 = paramo.d(localObject1);
                  d1 = ((zc)localObject3).a() - ((d.rb_)localObject2).z;
                  d3 = ((zc)localObject3).b() - ((d.rb_)localObject2).y;
                }
                Object localObject1 = new ArrayList(j + 2);
                localObject2 = paramo.r(locald);
                Object localObject3 = paramo.s(locald);
                double d6 = ((w)localObject2).a();
                double d7 = ((w)localObject3).a();
                double[] arrayOfDouble = new double[2];
                if ((bool2) || (localsb != null))
                {
                  if (!bool2) {}
                  localsb.a(paramo, locald, (byte)0, arrayOfDouble, true, d6 < d7);
                }
                double d8 = arrayOfDouble[1];
                w localw2;
                if (!bool2) {
                  if (d6 < d7)
                  {
                    ((ArrayList)localObject1).add(new w(((w)localObject2).a(), ((w)localObject2).b() + d8 + paramDouble));
                    m = 0;
                    do
                    {
                      do
                      {
                        if (m >= j) {
                          break;
                        }
                        localw2 = localzb.a(m);
                        ((ArrayList)localObject1).add(new w(d1 + localw2.a(), d3 + localw2.b() + d8 + paramDouble));
                        m++;
                        if (bool2) {
                          break label429;
                        }
                        if (bool1) {
                          break label427;
                        }
                      } while (!bool1);
                    } while (bool2);
                    ((ArrayList)localObject1).add(new w(((w)localObject3).a(), ((w)localObject3).b() + d8 + paramDouble));
                    if (!bool2) {
                      if (!bool1) {
                        break label575;
                      }
                    }
                  }
                  else
                  {
                    ((ArrayList)localObject1).add(new w(((w)localObject3).a(), ((w)localObject3).b() + d8 + paramDouble));
                  }
                }
                int m = j - 1;
                do
                {
                  do
                  {
                    if (m < 0) {
                      break;
                    }
                    localw2 = localzb.a(m);
                    ((ArrayList)localObject1).add(new w(d1 + localw2.a(), d3 + localw2.b() + d8 + paramDouble));
                    m--;
                    if ((!bool2) && (bool1)) {
                      break label575;
                    }
                  } while (!bool1);
                } while (bool2);
                ((ArrayList)localObject1).add(new w(((w)localObject2).a(), ((w)localObject2).b() + d8 + paramDouble));
                f localf2 = a((List)localObject1);
                paramf.d(localf2);
              }
            }
          } while (((!bool2) && (!bool1)) || (j < 2));
          localArrayList = new ArrayList(j);
          double d2 = localzb.a(0).a();
          double d4 = localzb.a(j - 1).a();
          Object localObject2 = new double[2];
          if ((bool2) || (localsb != null))
          {
            if (!bool2) {}
            localsb.a(paramo, locald, (byte)0, (double[])localObject2, true, d2 < d4);
          }
          d5 = localObject2[1];
          if (bool2) {
            break;
          }
          if (d2 < d4)
          {
            k = 0;
            do
            {
              if (k >= j) {
                break label846;
              }
              localw1 = localzb.a(k);
              localArrayList.add(new w(localw1.a(), localw1.b() + d5));
              k++;
              if ((!bool2) && (bool1)) {
                break;
              }
            } while (!bool1);
          }
        } while (bool2);
        int k = j - 1;
        do
        {
          if (k < 0) {
            break label846;
          }
          localw1 = localzb.a(k);
          localArrayList.add(new w(localw1.a(), localw1.b() + d5));
          k--;
          if ((!bool2) && (bool1)) {
            break;
          }
        } while (!bool1);
        f localf1 = a(localArrayList);
        paramf.d(localf1);
      } while ((bool2) || (bool2));
    } while (!bool1);
  }
  
  private f a(List paramList)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (paramList.isEmpty()) {
      return null;
    }
    f localf1 = new f(-1.797693134862316E+308D);
    f localf2 = new f(-1.797693134862316E+308D);
    Object localObject = null;
    Iterator localIterator = paramList.iterator();
    if (localIterator.hasNext()) {}
    label263:
    while (bool2)
    {
      w localw = (w)localIterator.next();
      if (!bool2) {
        if (localObject != null)
        {
          double d1 = Math.min(localObject.a(), localw.a());
          double d2 = Math.max(localObject.a(), localw.a());
          if (bool2) {
            break label263;
          }
          if (d1 != d2)
          {
            if (!bool2) {}
            double d3 = localObject.a() < localw.a() ? localObject.b() : localw.b();
            if (!bool2) {}
            double d4 = localObject.a() < localw.a() ? localw.b() : localObject.b();
            if (!bool2) {}
            double d5 = d4 == d3 ? 0.0D : (d4 - d3) / (d2 - d1);
            localf2.b(d1, d2, d3, d5);
            localf1.d(localf2);
            localf2.c(-1.797693134862316E+308D, 1.7976931348623157E+308D, -1.797693134862316E+308D);
          }
        }
      }
      localObject = localw;
      if (!bool1) {
        break;
      }
    }
    return localf1;
  }
  
  public int a(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int j = 0;
    ArrayList localArrayList = new ArrayList(120);
    int k = 0;
    label282:
    label377:
    label891:
    do
    {
      do
      {
        if (k >= paramac.a()) {
          break;
        }
        vb localvb = paramac.a(k);
        if ((!bool2) && (bool1)) {
          break label945;
        }
        if (localvb.d() != 1)
        {
          localArrayList.clear();
          v localv1 = localvb.c().f();
          do
          {
            if (localv1 == null) {
              break label930;
            }
            e locale1 = (e)localv1.c();
            ec localec1 = parambc.a(locale1);
            if (bool1) {
              break;
            }
            if (localec1.c() > 0)
            {
              v localv2 = localec1.b();
              do
              {
                if (localv2 == null) {
                  break label903;
                }
                a.c.d locald1 = (a.c.d)localv2.c();
                y localy = parambc.a(locald1);
                if (bool1) {
                  break;
                }
                if (localy.a() != 4)
                {
                  e locale2 = locald1.a(locale1);
                  ec localec2 = parambc.a(locale2);
                  if (!bool2) {
                    if (localec2.d() != 0)
                    {
                      if (bool2) {
                        break label282;
                      }
                      if (localec2.d() != 12)
                      {
                        if (bool2) {
                          break label282;
                        }
                        if (localec2.d() != 13)
                        {
                          if (bool2) {
                            continue;
                          }
                          if (localec2.d() != 15) {
                            break label891;
                          }
                        }
                      }
                    }
                  }
                  int m = parambc.a(locale2).i();
                  if (bool2) {
                    continue;
                  }
                  if (m < localArrayList.size())
                  {
                    if (!bool2) {
                      if (localy.d() != null)
                      {
                        if (bool2) {
                          break label377;
                        }
                        if (!localy.d().g())
                        {
                          if (bool2) {
                            break label377;
                          }
                          if (!localy.d().e())
                          {
                            if (bool2) {
                              continue;
                            }
                            if (!localy.d().f()) {
                              break label891;
                            }
                          }
                        }
                      }
                    }
                    if (!bool2)
                    {
                      if (localy.f() != null)
                      {
                        if (bool2) {
                          break label451;
                        }
                        if (!localy.f().g())
                        {
                          if (bool2) {
                            break label451;
                          }
                          if (!localy.f().e())
                          {
                            if (bool2) {
                              continue;
                            }
                            if (!localy.f().f()) {
                              break label891;
                            }
                          }
                        }
                      }
                      j++;
                    }
                    v localv3 = (v)localArrayList.get(m);
                    v localv4 = localv3;
                    v localv5 = localv1;
                    if (locald1.e() == locale2)
                    {
                      if ((bool2) || (localy.d() != null))
                      {
                        if (bool2) {
                          break label521;
                        }
                        if (localy.d().f()) {}
                      }
                      else
                      {
                        localv4 = localv3.a();
                      }
                      if ((bool2) || (localy.f() != null))
                      {
                        if (bool2) {
                          break label645;
                        }
                        if (localy.f().e())
                        {
                          localv5 = localv5.a();
                          if (bool2) {
                            break label645;
                          }
                          if (!bool1) {}
                        }
                      }
                    }
                    else
                    {
                      if ((bool2) || (localy.f() != null))
                      {
                        if (bool2) {
                          break label611;
                        }
                        if (localy.f().f()) {}
                      }
                      else
                      {
                        localv4 = localv3.a();
                      }
                      if ((bool2) || (localy.d() != null))
                      {
                        if (bool2) {
                          break label645;
                        }
                        if (localy.d().e()) {
                          localv5 = localv5.a();
                        }
                      }
                    }
                    int n = 0;
                    int i1 = 0;
                    do
                    {
                      if (localv4 == localv5) {
                        break;
                      }
                      e locale3 = (e)localv4.c();
                      n += locale3.d();
                      i1 += locale3.e();
                      ec localec3 = parambc.a(locale3);
                      if (bool1) {
                        break label862;
                      }
                      if (localec3.c() > 0)
                      {
                        v localv6 = localec3.b();
                        do
                        {
                          if (localv6 == null) {
                            break;
                          }
                          a.c.d locald2 = (a.c.d)localv6.c();
                          e locale4 = locald2.a(locale3);
                          int i2 = parambc.a(locale4).i();
                          if (bool1) {
                            break label864;
                          }
                          if (i2 >= m)
                          {
                            if (bool2) {
                              continue;
                            }
                            if (i2 <= localArrayList.size()) {}
                          }
                          else
                          {
                            if (!bool2)
                            {
                              if (parambc.a(locald2).l()) {
                                n++;
                              }
                            }
                            else
                            {
                              if (bool2) {
                                continue;
                              }
                              if (!bool1) {
                                break label826;
                              }
                            }
                            i1++;
                          }
                          localv6 = localv6.a();
                        } while (!bool1);
                      }
                      localv4 = localv4.a();
                      if (bool2) {
                        break label900;
                      }
                    } while (!bool1);
                    if (bool2) {
                      continue;
                    }
                    if (n != i1)
                    {
                      if (!bool2) {}
                      localy.a(n < i1);
                    }
                  }
                }
                localv2 = localv2.a();
              } while (!bool1);
            }
            localArrayList.add(localv1);
            localv1 = localv1.a();
            if (bool2) {
              break label945;
            }
          } while (!bool1);
        }
        k++;
      } while (bool2);
    } while (!bool1);
    label451:
    label611:
    return j;
  }
  
  public void a(o paramo, kb paramkb, vb paramvb, bc parambc, boolean paramBoolean, double paramDouble)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    sb localsb = sb.c(paramo);
    v localv1 = paramvb.c().f();
    label337:
    label739:
    label751:
    do
    {
      if (localv1 == null) {
        break;
      }
      e locale = (e)localv1.c();
      ec localec = parambc.a(locale);
      do
      {
        if (localec.c() > 0)
        {
          v localv2 = localec.b();
          do
          {
            if (localv2 == null) {
              break label751;
            }
            a.c.d locald = (a.c.d)localv2.c();
            if (bool1) {
              break;
            }
            if (locald.e() == locale)
            {
              if (bool2) {
                continue;
              }
              if (paramBoolean == c(parambc, locald))
              {
                double d1 = 1.7976931348623157E+308D;
                double d2 = -1.797693134862316E+308D;
                y localy = parambc.a(locald);
                if ((bool2) || (localy.a() != 4))
                {
                  cd localcd1 = localy.d();
                  Object localObject;
                  w localw;
                  if (((bool2) || (localcd1 != null)) && ((bool2) || ((localcd1.b() == 4) || (localcd1.b() == 8))))
                  {
                    localObject = paramo.e(locald);
                    localw = ((zb)localObject).a(0);
                    if (!bool2) {
                      if (!bool1) {
                        break label337;
                      }
                    }
                  }
                  else
                  {
                    localw = paramo.r(locald);
                  }
                  if (!bool2) {
                    if (paramBoolean) {
                      if (!bool2)
                      {
                        if (!a(parambc.a(locald.e()))) {
                          break label337;
                        }
                        d1 = localw.b + paramDouble - a(parambc, locald, true);
                      }
                    }
                  }
                  if ((bool2) || ((bool1) && (a(parambc.a(locald.e()))))) {
                    d2 = localw.b + a(parambc, locald, true);
                  }
                  cd localcd2 = localy.f();
                  if (((bool2) || (localcd2 != null)) && ((bool2) || ((localcd2.b() == 4) || (localcd2.b() == 8))))
                  {
                    zb localzb = paramo.e(locald);
                    localObject = localzb.a(localzb.a() - 1);
                    if (!bool2) {
                      if (!bool1) {
                        break label532;
                      }
                    }
                  }
                  else
                  {
                    localObject = paramo.s(locald);
                  }
                  if (!bool2) {
                    if (paramBoolean) {
                      if (!bool2)
                      {
                        if (!a(parambc.a(locald.f()))) {
                          break label532;
                        }
                        if (bool2) {
                          break label541;
                        }
                        d1 = Math.min(d1, ((w)localObject).b + paramDouble - a(parambc, locald, false));
                      }
                    }
                  }
                  if ((bool1) && (a(parambc.a(locald.f())))) {
                    d2 = Math.max(d2, ((w)localObject).b + a(parambc, locald, false));
                  }
                  double d3 = a(paramo, parambc, locald);
                  double[] arrayOfDouble = new double[2];
                  if (!bool2) {}
                  localsb.a(paramo, locald, (byte)0, arrayOfDouble, true, localw.a < ((w)localObject).a);
                  z localz = parambc.a(locald).m();
                  if (!bool2) {}
                  if (!bool2) {}
                  if (!bool2) {}
                  kb.g_ localg_ = paramkb.a(locald, this.g, Math.max(d3, arrayOfDouble[0] * 2.0D), Math.max(d3, arrayOfDouble[1] * 2.0D), localw.a, !paramBoolean, ((w)localObject).a, !paramBoolean, !a(parambc, locald), localz.j());
                  if (!bool2)
                  {
                    if (paramBoolean) {
                      localg_.q = d1;
                    }
                  }
                  else
                  {
                    if (bool2) {
                      continue;
                    }
                    if (!bool1) {
                      break label739;
                    }
                  }
                  localg_.p = d2;
                }
              }
            }
            localv2 = localv2.a();
          } while (!bool1);
        }
        localv1 = localv1.a();
      } while (bool2);
    } while (!bool1);
    label532:
    label541:
    return;
  }
  
  private static final boolean a(ec paramec)
  {
    boolean bool = d.R;
    if (!bool) {
      if (paramec.d() != 0) {
        if (bool) {
          break label32;
        }
      }
    }
    label32:
    return paramec.d() == 5;
  }
  
  private final double a(bc parambc, a.c.d paramd, boolean paramBoolean)
  {
    boolean bool = d.R;
    y localy = parambc.a(paramd);
    z localz = localy.m();
    if (localz != null)
    {
      if (!bool) {
        if (paramBoolean) {
          return localy.k() ? localz.b() : localz.a();
        }
      }
      return localy.k() ? localz.a() : localz.b();
    }
    if (!bool) {
      if (paramBoolean) {
        return localy.k() ? 15.0D : 10.0D;
      }
    }
    return localy.k() ? 10.0D : 15.0D;
  }
  
  private s a(q paramq)
  {
    a.c.k localk = paramq.c(d.L);
    if (!d.R) {
      if (localk == null) {
        return null;
      }
    }
    return (s)localk.get(paramq);
  }
  
  protected double a(o paramo, bc parambc, a.c.d paramd)
  {
    boolean bool = d.R;
    double d1 = 0.0D;
    s locals = a(paramo);
    if (locals != null)
    {
      int j = parambc.a(paramd.e()).d();
      int k = parambc.a(paramd.f()).d();
      if ((bool) || ((j == 15) || (k == 15))) {
        d1 = locals.b * 0.5D;
      }
    }
    z localz = parambc.a(paramd).m();
    return d1 + ((bool) || (localz != null) ? localz.d() : this.f);
  }
  
  public Rectangle2D.Double a(o paramo, bc parambc, e parame1, e parame2, List paramList)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    if (paramList.size() > 0)
    {
      zc localzc1 = paramo.d(parame1);
      zc localzc2 = paramo.d(parame2);
      kb localkb = new kb();
      double d1 = 0.0D;
      localkb.a(0.0D);
      localkb.a(true);
      localkb.b((0.0D / 0.0D));
      double d2 = 1.7976931348623157E+308D;
      double d3 = -1.797693134862316E+308D;
      sb localsb = sb.c(paramo);
      int j = 0;
      if (j < paramList.size()) {}
      Object localObject1;
      Object localObject2;
      double d14;
      label401:
      label441:
      while (bool2)
      {
        a.c.d locald1 = (a.c.d)paramList.get(j);
        zb localzb1 = paramo.e(locald1);
        localzb1.b();
        double d6 = a(paramo, parambc, locald1);
        if (bool2) {
          break label969;
        }
        double d7 = this.g;
        localObject1 = new double[2];
        s locals = new s(0.0D, 0.0D);
        double[] arrayOfDouble = new double[2];
        localObject2 = new s(0.0D, 0.0D);
        if (bool1) {
          break label966;
        }
        double d9;
        double d11;
        double d13;
        z localz2;
        double d15;
        double d16;
        if (locald1.e() == parame1)
        {
          if (!bool2)
          {
            if (localsb != null) {
              locals = localsb.a(paramo, locald1, (byte)0, (double[])localObject1, true, true, (byte)2);
            }
          }
          else {
            localObject2 = localsb.a(paramo, locald1, (byte)0, arrayOfDouble, true, true, (byte)1);
          }
          d9 = localzc1.b() + localzc1.d() * 0.5D + localzb1.c().b;
          d11 = localzc2.b() + localzc2.d() * 0.5D + localzb1.d().b;
          if (!bool2) {
            if (d9 >= d11)
            {
              d13 = Math.max(localObject1[1], arrayOfDouble[1] - d9 + d11);
              d14 = -Math.max(arrayOfDouble[0], localObject1[0] - d9 + d11);
              if (bool2) {
                break label441;
              }
              if (!bool1) {
                break label401;
              }
            }
          }
          d13 = -Math.max(localObject1[0], arrayOfDouble[0] - d11 + d9);
          d14 = Math.max(arrayOfDouble[1], localObject1[1] - d11 + d9);
          d2 = Math.min(d2, Math.min(d9 + d13, d11 + d14));
          d3 = Math.max(d3, Math.max(d9 + d13, d11 + d14));
          localz2 = parambc.a(locald1).m();
          d15 = localz2.j() / a;
          d16 = !a(parambc, locald1) ? d15 : 0.0D;
          localkb.a(locald1, d7, Math.max(d6, locals.a) + d16, Math.max(d6, ((s)localObject2).a) + d16, d9 + d13, true, d11 + d14, false, false, 0.0D);
          if (bool2) {
            break label951;
          }
          if (localz2 != null)
          {
            d1 = Math.max(d1, localz2.c() - Math.abs(d9 - d11));
            if (bool2) {
              break label953;
            }
            if (!bool1) {}
          }
        }
        else
        {
          if (!bool2)
          {
            if (localsb != null) {
              locals = localsb.a(paramo, locald1, (byte)0, (double[])localObject1, true, false, (byte)2);
            }
          }
          else {
            localObject2 = localsb.a(paramo, locald1, (byte)0, arrayOfDouble, true, false, (byte)1);
          }
          d9 = localzc1.b() + localzc1.d() * 0.5D + localzb1.d().b;
          d11 = localzc2.b() + localzc2.d() * 0.5D + localzb1.c().b;
          if (!bool2) {
            if (d11 < d9)
            {
              d13 = -Math.max(localObject1[0], arrayOfDouble[0] - d9 + d11);
              d14 = Math.max(arrayOfDouble[1], localObject1[1] - d9 + d11);
              if (bool2) {
                break label823;
              }
              if (!bool1) {
                break label783;
              }
            }
          }
          d13 = Math.max(localObject1[1], arrayOfDouble[1] - d11 + d9);
          d14 = -Math.max(arrayOfDouble[0], localObject1[0] - d11 + d9);
          d2 = Math.min(d2, Math.min(d11 + d13, d9 + d14));
          d3 = Math.max(d3, Math.max(d11 + d13, d9 + d14));
          localz2 = parambc.a(locald1).m();
          d15 = localz2.j() / a;
          d16 = !a(parambc, locald1) ? d15 : 0.0D;
          localkb.a(locald1, d7, Math.max(d6, ((s)localObject2).a) + d16, Math.max(d6, locals.a) + d16, d9 + d14, true, d11 + d13, false, false, 0.0D);
          if (bool2) {
            break label951;
          }
          if (localz2 != null) {
            d1 = Math.max(d1, localz2.c() - Math.abs(d11 - d9));
          }
        }
        j++;
        if (!bool1) {
          break;
        }
      }
      label783:
      label823:
      label951:
      label953:
      localkb.u();
      label966:
      label969:
      double d4 = 1.7976931348623157E+308D;
      double d5 = -1.797693134862316E+308D;
      int k = 0;
      label2100:
      do
      {
        do
        {
          if (k >= paramList.size()) {
            break;
          }
          a.c.d locald2 = (a.c.d)paramList.get(k);
          zb localzb2 = paramo.e(locald2);
          localObject1 = localkb.a(locald2);
          if (bool1) {
            break label2139;
          }
          if ((bool2) || (localObject1 != null))
          {
            if (bool2) {
              continue;
            }
            if (!Double.isNaN(((kb.g_)localObject1).h))
            {
              d4 = Math.min(d4, ((kb.g_)localObject1).h - ((kb.g_)localObject1).j);
              d5 = Math.max(d5, ((kb.g_)localObject1).h + ((kb.g_)localObject1).k);
              double d8 = ((kb.g_)localObject1).h;
              localObject2 = localzb2.c();
              w localw = localzb2.d();
              if (a(parambc, locald2))
              {
                if (locald2.e() == parame1)
                {
                  localzb2.a(d8, localzc1.b() + localzc1.d() * 0.5D + ((w)localObject2).b);
                  localzb2.a(d8, localzc2.b() + localzc2.d() * 0.5D + localw.b);
                  if (bool2) {
                    continue;
                  }
                  if (!bool1) {}
                }
                else
                {
                  localzb2.a(d8, localzc2.b() + localzc2.d() * 0.5D + ((w)localObject2).b);
                  localzb2.a(d8, localzc1.b() + localzc1.d() * 0.5D + localw.b);
                  if (bool2) {
                    continue;
                  }
                  if (!bool1) {}
                }
              }
              else
              {
                double d10;
                double d12;
                z localz1;
                if (locald2.e() == parame1)
                {
                  d10 = localzc1.b() + localzc1.d() * 0.5D + ((w)localObject2).b;
                  d12 = localzc2.b() + localzc2.d() * 0.5D + localw.b;
                  localz1 = parambc.a(locald2).m();
                  d14 = localz1.j() / a;
                  if (!bool2) {
                    if (((kb.g_)localObject1).a() == 2)
                    {
                      if (!bool2)
                      {
                        if (d12 - d10 <= 2.0D * d14)
                        {
                          localzb2.a(((kb.g_)localObject1).h - (d12 - d10) * 0.5D, d10);
                          localzb2.a(((kb.g_)localObject1).h + (d12 - d10) * 0.5D, d12);
                          if (bool2) {
                            continue;
                          }
                          if (!bool1) {
                            break label2100;
                          }
                        }
                        localzb2.a(((kb.g_)localObject1).h - d14, d10);
                        localzb2.a(((kb.g_)localObject1).h, d10 + d14);
                        localzb2.a(((kb.g_)localObject1).h, d12 - d14);
                        localzb2.a(((kb.g_)localObject1).h + d14, d12);
                      }
                      if (bool2) {
                        continue;
                      }
                      if (!bool1) {
                        break label2100;
                      }
                    }
                  }
                  if (!bool2)
                  {
                    if (d10 - d12 <= 2.0D * d14)
                    {
                      localzb2.a(((kb.g_)localObject1).h - (d10 - d12) * 0.5D, d10);
                      localzb2.a(((kb.g_)localObject1).h + (d10 - d12) * 0.5D, d12);
                      if (bool2) {
                        continue;
                      }
                      if (!bool1) {}
                    }
                    else
                    {
                      localzb2.a(((kb.g_)localObject1).h - d14, d10);
                      localzb2.a(((kb.g_)localObject1).h, d10 - d14);
                      localzb2.a(((kb.g_)localObject1).h, d12 + d14);
                      localzb2.a(((kb.g_)localObject1).h + d14, d12);
                    }
                  }
                  else
                  {
                    if (bool2) {
                      continue;
                    }
                    if (!bool1) {}
                  }
                }
                else
                {
                  d10 = localzc2.b() + localzc2.d() * 0.5D + ((w)localObject2).b;
                  d12 = localzc1.b() + localzc1.d() * 0.5D + localw.b;
                  localz1 = parambc.a(locald2).m();
                  d14 = localz1.j() / a;
                  if (!bool2) {
                    if (2 != ((kb.g_)localObject1).a())
                    {
                      if (!bool2)
                      {
                        if (d12 - d10 <= 2.0D * d14)
                        {
                          localzb2.a(((kb.g_)localObject1).h + (d12 - d10) * 0.5D, d10);
                          localzb2.a(((kb.g_)localObject1).h - (d12 - d10) * 0.5D, d12);
                          if (bool2) {
                            continue;
                          }
                          if (!bool1) {
                            break label2100;
                          }
                        }
                        localzb2.a(((kb.g_)localObject1).h + d14, d10);
                        localzb2.a(((kb.g_)localObject1).h, d10 + d14);
                        localzb2.a(((kb.g_)localObject1).h, d12 - d14);
                        localzb2.a(((kb.g_)localObject1).h - d14, d12);
                      }
                      if (bool2) {
                        continue;
                      }
                      if (!bool1) {
                        break label2100;
                      }
                    }
                  }
                  if (!bool2)
                  {
                    if (d10 - d12 <= 2.0D * d14)
                    {
                      localzb2.a(((kb.g_)localObject1).h + (d10 - d12) * 0.5D, d10);
                      localzb2.a(((kb.g_)localObject1).h - (d10 - d12) * 0.5D, d12);
                    }
                  }
                  else
                  {
                    if (bool2) {
                      continue;
                    }
                    if (!bool1) {
                      break label2100;
                    }
                  }
                  localzb2.a(((kb.g_)localObject1).h + d14, d10);
                  localzb2.a(((kb.g_)localObject1).h, d10 - d14);
                  localzb2.a(((kb.g_)localObject1).h, d12 + d14);
                  localzb2.a(((kb.g_)localObject1).h - d14, d12);
                }
              }
            }
          }
          k++;
        } while (!bool1);
      } while (bool2);
      if (d4 > d5) {
        return new Rectangle2D.Double(0.0D, d2, d1, d3 - d2);
      }
      label2139:
      return new Rectangle2D.Double(d4, d2, Math.max(d1, d5 - d4), d3 - d2);
    }
    return null;
  }
  
  private boolean a(bc parambc, a.c.d paramd)
  {
    boolean bool = d.R;
    if (((bool) || (parambc != null)) && ((bool) || (parambc.a(paramd) != null)))
    {
      if (bool) {
        break label63;
      }
      if (parambc.a(paramd).m() != null) {}
    }
    else
    {
      return true;
    }
    label63:
    oc localoc = parambc.a(paramd).m().i();
    if (!bool) {
      if (b(paramd, parambc))
      {
        if (!bool) {}
        return localoc.a() == 0;
      }
    }
    if (!bool) {
      if (a(paramd, parambc))
      {
        if (!bool) {}
        return localoc.d() == 0;
      }
    }
    if (!bool) {}
    return localoc.c() == 0;
  }
  
  private static boolean a(a.c.d paramd, bc parambc)
  {
    boolean bool = d.R;
    a.c.d locald = parambc.a(paramd).c();
    ec localec1 = parambc.a(paramd.e());
    ec localec2 = parambc.a(paramd.f());
    if (locald == null)
    {
      if (!bool) {}
      return localec1.h() == localec2.h();
    }
    ec localec3 = parambc.a(locald.e());
    ec localec4 = parambc.a(locald.f());
    if (((bool) || (!b(localec1))) && ((bool) || (!b(localec2))) && ((bool) || (!b(localec3))) && ((bool) || (!b(localec4)))) {
      if (bool) {}
    }
    return localec3.h() == localec4.h();
  }
  
  private static boolean b(ec paramec)
  {
    boolean bool = d.R;
    if (!bool) {
      if (paramec == null) {
        return false;
      }
    }
    if (!bool) {}
    return paramec.d() == 15;
  }
  
  private static boolean b(a.c.d paramd, bc parambc)
  {
    boolean bool = d.R;
    ec localec1 = parambc.a(paramd.e());
    ec localec2 = parambc.a(paramd.f());
    a.c.d locald = parambc.a(paramd).c();
    ec localec3 = locald == null ? null : parambc.a(locald.e());
    ec localec4 = locald == null ? null : parambc.a(locald.f());
    if (!bool) {
      if (localec1.d() != 8)
      {
        if (bool) {
          break label200;
        }
        if (localec1.d() != 9)
        {
          if (bool) {
            break label200;
          }
          if (localec2.d() != 8)
          {
            if (bool) {
              break label200;
            }
            if (localec2.d() != 9)
            {
              if (bool) {
                break label200;
              }
              if (!b(localec1))
              {
                if (bool) {
                  break label200;
                }
                if (!b(localec2))
                {
                  if (bool) {
                    break label200;
                  }
                  if (!b(localec3)) {
                    if (bool) {
                      break label200;
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
    label200:
    return b(localec4);
  }
  
  public void c(o paramo, ac paramac, bc parambc, rb paramrb)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    int j = 0;
    label41:
    label310:
    label348:
    label631:
    do
    {
      do
      {
        if (j >= paramac.a()) {
          break;
        }
        vb localvb = paramac.a(j);
        if ((bool2) || (localvb.d() != 1))
        {
          int k = 0;
          bb localbb = localvb.c();
          int m = -1;
          v localv1 = localbb.f();
          do
          {
            if (localv1 == null) {
              break label631;
            }
            e locale1 = (e)localv1.c();
            ec localec1 = parambc.a(locale1);
            int n = localec1.d();
            if (bool1) {
              break;
            }
            if ((n != 0) && ((bool2) || (n != 12))) {
              if (!bool2)
              {
                if (n != 13) {
                  if (bool2) {
                    break label604;
                  }
                }
              }
              else {
                if (n != 15) {
                  break label597;
                }
              }
            }
            v localv2 = localec1.b();
            do
            {
              if (localv2 == null) {
                break label597;
              }
              a.c.d locald = (a.c.d)localv2.c();
              e locale2 = locald.a(locale1);
              ec localec2 = parambc.a(locale2);
              if (bool1) {
                break;
              }
              if (localec2.i() < k)
              {
                if (bool2) {
                  continue;
                }
                if (m <= localec2.i())
                {
                  y localy = parambc.a(locald);
                  int i1 = locald.e() == locale1 ? 1 : 0;
                  cd localcd1;
                  if (i1 != 0)
                  {
                    localcd1 = localy.d();
                    localcd2 = localy.f();
                    if (!bool2) {
                      if (!bool1) {
                        break label310;
                      }
                    }
                  }
                  else
                  {
                    localcd1 = localy.f();
                  }
                  cd localcd2 = localy.d();
                  if (!bool2) {
                    if (localcd1 != null)
                    {
                      if (bool2) {
                        break label348;
                      }
                      if (!localcd1.g())
                      {
                        if (bool2) {
                          continue;
                        }
                        if (!localcd1.f()) {
                          break label585;
                        }
                      }
                    }
                  }
                  if ((bool2) || (localcd2 != null))
                  {
                    if (bool2) {
                      break label398;
                    }
                    if (!localcd2.g())
                    {
                      if (bool2) {
                        continue;
                      }
                      if (!localcd2.e()) {
                        break label585;
                      }
                    }
                  }
                  if (!bool2)
                  {
                    paramrb.g(locald);
                    if (i1 != 0)
                    {
                      if ((bool2) || (localcd1 != null)) {
                        if (bool2) {}
                      }
                      paramrb.a(locald, true, cd.a((byte)8, localcd1.a()));
                      if ((bool2) || (localcd2 != null)) {
                        if (bool2) {}
                      }
                      paramrb.a(locald, false, cd.a((byte)4, localcd2.a()));
                      if (bool2) {
                        continue;
                      }
                      if (!bool1) {
                        break label585;
                      }
                    }
                  }
                  if ((bool2) || (localcd1 != null)) {
                    if (bool2) {}
                  }
                  paramrb.a(locald, false, cd.a((byte)8, localcd1.a()));
                  if ((bool2) || (localcd2 != null)) {
                    if (bool2) {}
                  }
                  paramrb.a(locald, true, cd.a((byte)4, localcd2.a()));
                }
              }
              localv2 = localv2.a();
            } while (!bool1);
            if (bool2) {
              break label41;
            }
            if (!bool2)
            {
              if (n == 0) {
                m = k;
              }
              localv1 = localv1.a();
              k++;
            }
          } while (!bool1);
        }
        j++;
      } while (bool2);
    } while (!bool1);
    label398:
    label585:
    label597:
    label604:
    return;
  }
  
  public void b(o paramo, kb paramkb, vb paramvb, bc parambc, boolean paramBoolean, double paramDouble)
  {
    boolean bool2 = d.R;
    boolean bool1 = d.Q;
    v localv1 = paramvb.c().f();
    label220:
    label360:
    label1261:
    label1273:
    do
    {
      if (localv1 == null) {
        break;
      }
      e locale = (e)localv1.c();
      ec localec = parambc.a(locale);
      do
      {
        if (localec.c() > 0)
        {
          v localv2 = localec.b();
          do
          {
            if (localv2 == null) {
              break label1273;
            }
            a.c.d locald = (a.c.d)localv2.c();
            if (bool1) {
              break;
            }
            if (locald.e() == locale)
            {
              if (bool2) {
                continue;
              }
              if (paramBoolean == c(parambc, locald))
              {
                paramo.g(locald);
                zb localzb = paramo.e(locald);
                y localy = parambc.a(locald);
                if (!bool2) {
                  if (localy.a() == 4)
                  {
                    paramo.f(locald);
                    if (bool2) {
                      continue;
                    }
                    if (!bool1) {
                      break label1261;
                    }
                  }
                }
                cd localcd1 = localy.d();
                if ((bool2) || (localcd1 != null)) {
                  if (!bool2) {
                    if (localcd1.b() != 4) {
                      if (bool2) {
                        break label220;
                      }
                    }
                  }
                }
                int j = localcd1.b() == 8 ? 1 : 0;
                cd localcd2 = localy.f();
                if ((bool2) || (localcd2 != null)) {
                  if (!bool2) {
                    if (localcd2.b() != 4) {
                      if (bool2) {
                        break label275;
                      }
                    }
                  }
                }
                int k = localcd2.b() == 8 ? 1 : 0;
                if (!bool2) {
                  if (a(parambc, locald))
                  {
                    if (j != 0)
                    {
                      d1 = localzb.a(0).a;
                      localzb.a(0, d1, paramo.r(locald).b + paramDouble);
                      if (bool2) {
                        break label360;
                      }
                      if (!bool1) {}
                    }
                    else
                    {
                      d1 = paramo.r(locald).a;
                    }
                    if (k != 0)
                    {
                      d2 = localzb.a(localzb.a() - 1).a;
                      localzb.a(localzb.a() - 1, d1, paramkb.d(locald));
                      localzb.a(d2, paramkb.d(locald));
                      localzb.a(d2, paramo.s(locald).b + paramDouble);
                      if (!bool2) {
                        if (!bool1) {
                          break label1255;
                        }
                      }
                    }
                    else
                    {
                      d2 = paramo.s(locald).a;
                      localzb.a(d1, paramkb.d(locald));
                      localzb.a(d2, paramkb.d(locald));
                    }
                    if ((!bool2) && (!bool1)) {
                      break label1255;
                    }
                  }
                }
                double d1 = j != 0 ? localzb.a(0).a : paramo.r(locald).a;
                double d2 = k != 0 ? localzb.a(localzb.a() - 1).a : paramo.s(locald).a;
                z localz = parambc.a(locald).m();
                double d3 = localz.j() / a;
                kb.g_ localg_ = paramkb.a(locald);
                if (!bool2) {}
                int m = localg_.a() == 0 ? 1 : 0;
                double d4 = m != 0 ? localg_.h - (localg_.u - localg_.f) : localg_.h + (localg_.u - localg_.f);
                double d5 = m != 0 ? localg_.h - (localg_.g - localg_.v) : localg_.h + (localg_.g - localg_.v);
                localzb.b();
                if (!bool2) {}
                int n = d1 < d2 ? 1 : 0;
                double d6 = n != 0 ? d4 : d5;
                double d7 = n != 0 ? d5 : d4;
                double d8;
                int i1;
                double d9;
                if (j != 0)
                {
                  d8 = paramo.r(locald).b + paramDouble;
                  if (!bool2) {}
                  i1 = localcd1.b() == 4 ? 1 : 0;
                  d9 = Math.abs(d8 - d6);
                  if (d9 > d3)
                  {
                    if (!bool2) {
                      localzb.a(i1 != 0 ? d1 - d3 : d1 + d3, d8);
                    }
                    localzb.a(d1, m != 0 ? d8 + d3 : d8 - d3);
                    if (bool2) {
                      break label982;
                    }
                    localzb.a(d1, d6);
                    if (!bool1) {}
                  }
                  else
                  {
                    localzb.a(i1 != 0 ? d1 - d9 : d1 + d9, d8);
                    if (!bool2)
                    {
                      if (n != i1)
                      {
                        if (bool2) {
                          break label982;
                        }
                        localzb.a(d1, d6);
                      }
                    }
                    else if (!bool1) {}
                  }
                }
                else
                {
                  localzb.a(d1, d6);
                }
                localzb.a(n != 0 ? localg_.u : localg_.v, localg_.h);
                if (!bool2)
                {
                  localzb.a(n != 0 ? localg_.v : localg_.u, localg_.h);
                  if (k != 0)
                  {
                    d8 = paramo.s(locald).b + paramDouble;
                    if (!bool2) {}
                    i1 = localcd2.b() == 8 ? 1 : 0;
                    d9 = Math.abs(d8 - d7);
                    if (!bool2) {
                      if (d9 > d3)
                      {
                        if (!bool2) {
                          localzb.a(d2, d7);
                        }
                        localzb.a(d2, m != 0 ? d8 + d3 : d8 - d3);
                        localzb.a(i1 != 0 ? d2 + d3 : d2 - d3, d8);
                        if ((!bool2) && (!bool1)) {
                          break label1255;
                        }
                      }
                    }
                    if (n != i1) {
                      localzb.a(d2, d7);
                    }
                    if (bool2) {
                      break label1250;
                    }
                    localzb.a(i1 != 0 ? d2 + d9 : d2 - d9, d8);
                    if (!bool1) {
                      break label1255;
                    }
                  }
                }
                localzb.a(d2, d7);
                paramo.f(locald);
              }
            }
            localv2 = localv2.a();
          } while (!bool1);
        }
        localv1 = localv1.a();
      } while (bool2);
    } while (!bool1);
    label275:
    label982:
    label1250:
    label1255:
    return;
  }
  
  public boolean c(bc parambc, a.c.d paramd)
  {
    y localy = parambc.a(paramd);
    return localy.l();
  }
  
  public ab a()
  {
    return this.b;
  }
  
  public double c()
  {
    return this.f;
  }
  
  public void a(double paramDouble)
  {
    this.f = paramDouble;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.d.a.k

 * JD-Core Version:    0.7.0.1

 */